<?php

$javascript->link(
			array('http://www.google.com/jsapi'),
			false
		);

		$javascript->codeBlock('var initJquery = function(){google.load("jquery", "1.2");	google.load("jqueryui", "1.5");} ; try {initJquery(); } catch (e){ setTimeout("1000" , initJquery ); }' , array('inline'=>false) );
		
		$javascript->link(
			array(
			'jquery-cycle.js',
			'jquery-easing.js',
			'historyTabs.js'
			),false);

		$html->css(array(
			'/themes/default/css/jquery-ui/theme/ui.all.css',
			'historyStyles.css'
		)
			,
		'stylesheet', 'media=screen',
		false);


		
		?>
    <p><a href="/users/home?date=<?php echo $handDate;?>">Back to Calendar</a></p>
	
	<h1>User: <?php echo $userName;?></h1>
	<div id="stats">
<?php echo $this->renderElement('handStats',array('stats',$stats));?>
</div>
	
	
<div id="dataWrapper">
	<div class="handHistory">
    
    <?php
	//echo '<pre>'.$hands.'</pre>';
	foreach($hands as $handNumber=>$hand){
			echo '<div class="hand" id="'.$handNumber.'">';
	
			echo $this->renderElement('cards',
									  array('handNumber'=>$handNumber,
											   'hand'=>$hand,
											   'userName'=>$userName)
									  );			
			echo $this->renderElement('handStatus',array('handNumber'=>$handNumber,
											   'hand'=>$hand,
											   'userName'=>$userName
									));	
			echo $this->renderElement('potInformation',array('handNumber'=>$handNumber,
											   'hand'=>$hand,
											   'userName'=>$userName
									));			
			
			echo '</div>';//end hand div
	}?>
    
    	</div>

	<div id="informationPane">
    </div>
    <br style="clear:both;"/>
    <?php if($_REQUEST['table']=='STT %238695671.txt'){ ?>
    <div id="comments"><h2><strong>Comments On This Game</strong></h2>
    	<div id="gameComment1234" class="comment">
        	<p>You re-raised he flop with air on the bubble?? Why?</p>
            <div class="comment-author">RonHeywood 02 March 2009 22:28 <a href="#">report</a></div>
        </div>
    </div>
    <?php } ?>
</div>